package cn.minsh.lims.eoms.modules.app.enums;

import lombok.Getter;

/**
 * @author Administrator
 */
@Getter
public enum OrderStatusEnum {
    NOT_STARTED(1,"未开始"),
    STARTED(2,"处理中"),
    COMPLETE(3,"已完成"),
    CLOSE(4,"关闭"),
    REJECT(5,"拒绝");

    private Integer code ;
    private String desc ;

    OrderStatusEnum(Integer code, String desc){
        this.code = code ;
        this.desc = desc ;
    }

    public OrderStatusEnum valueOf(Integer code){
        for (OrderStatusEnum planStatusEnum :values()){
            if (planStatusEnum.getCode().equals(code)){
                return planStatusEnum ;
            }
        }
        return null ;
    }

    public static String getDesc(Integer code){
        for (OrderStatusEnum planStatusEnum :values()){
            if (planStatusEnum.getCode().equals(code)){
                return planStatusEnum.getDesc() ;
            }
        }
        return null ;
    }
}
